{extend name="base" /} {block name="body"}
<div class="layui-body">
	<!--tab标签-->
	<div class="layui-tab layui-tab-brief">
		<ul class="layui-tab-title">
			<li class="layui-this">会员管理</li>
			<li class="">
				<a href="{:url('member/add')}">添加会员</a>
			</li>
		</ul>
		<div class="layui-tab-content">
			<div class="layui-tab-item layui-show">
				<form class="layui-form layui-form-pane" action="{:url('member/index')}" method="get">
					<div class="layui-inline">
						<label class="layui-form-label">关键词</label>
						<div class="layui-input-inline">
							<input type="text" name="keyword" value="{$keyword}" placeholder="请输入关键词" class="layui-input">
						</div>
					</div>
					<div class="layui-inline">
						<select name="ziduan">
							<option value="id" {if $ziduan=='id' }selected{/if}>会员ID</option>
							<option value="mobile" {if $ziduan=='mobile' }selected{/if}>会员账号</option>
						</select>
					</div>
					<div class="layui-inline">
						<label class="layui-form-label">排序</label>
						<div class="layui-input-inline">
							<select name="param">
								<option value="add_time" {if $param=='add_time' }selected{/if}>注册时间</option>
								<option value="money" {if $param=='money' }selected{/if}>可用余额</option>
								<option value="frozen_money" {if $param=='frozen_money' }selected{/if}>冻结余额</option>
								<option value="coin" {if $param=='coin' }selected{/if}>可用币</option>
								<option value="trade_coin" {if $param=='trade_coin' }selected{/if}>冻结币</option>
							</select>
						</div>
					</div>
					<div class="layui-inline">
						<select name="sort">
							<option value="asc" {if $sort=='asc' }selected{/if}>从低到高</option>
							<option value="desc" {if $sort=='desc' }selected{/if}>从高到底</option>
						</select>
					</div>
					<div class="layui-inline">
						<button class="layui-btn">搜索</button>
					</div>
					<br><br>
					<div class="layui-inline">
							<a  class="layui-btn" href="{:url('export')}">导出</a>会员总余额：{$moneys}。 会员总冻结余额：{$frozen_moneys}。 会员总币：{$coins}。 会员总冻结币：{$trade_coins}。会员总推广币：{$tui_coins}。
					</div>
				</form>
				<hr>
				<table class="layui-table">
					<thead>
						<tr>
							<th>ID</th>
							<th>账号(手机号)</th>
							<th>姓名</th>
							<th>余额</th>
							<th>冻结余额</th>
							<th>注册时间</th>
							<th>登录时间</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody>
						{foreach name="member_list" item="vo"}
						<tr>
							<td>{$vo.id}</td>
							<td>{$vo.mobile}</td>
							<td>{$vo.real_name}</td>
							<td>{$vo.money}</td>
							<td>{$vo.frozen_money}</td>
							<td>{$vo.add_time}</td>
							<td>{$vo.login_time}</td>
							<td>
								<a href="{:url('member/score',['mobile'=>$vo['mobile']])}" class="layui-btn layui-btn-small" title="充值余额">余额充值</a>
								<a href="{:url('member/edit',['id'=>$vo['id']])}" class="layui-btn layui-btn-normal layui-btn-small">编辑</a>
								<a href="{:url('member/delete',['id'=>$vo['id']])}" class="layui-btn layui-btn-danger layui-btn-small ajax-delete">删除</a>
							</td>
						</tr>
						{/foreach}
					</tbody>
				</table>
				<!--分页-->
				{$member_list->render()}
			</div>
		</div>
	</div>
</div>
<script>
	// 定义全局JS变量
	var GV = {
		current_controller: "adminjcb/{$controller}/index"
	};
</script>
{/block}